<template>
	<div class="widgets bg-white">
		<el-input v-model.trim="searchText" placeholder="输入搜索内容" class="search__input" @keyup.enter.native="search"></el-input>
        <el-button type="primary" @click="search">查询</el-button>
        <div class="btn-group right">
	        <el-button type="info" @click="refresh">刷新</el-button>
	        <el-button type="primary" @click="add">新增</el-button>
	        <el-button type="danger" v-if="multipleSelection.length <= 0" disabled>删除</el-button>
	        <el-button type="danger" v-else @click="del">删除</el-button>
	        <el-button type="danger" v-if="multipleSelection.length <= 0" disabled>禁用</el-button>
	        <el-button type="danger" v-else @click="disabedBtn(0, '禁用')">禁用</el-button>
	        <el-button type="success" v-if="multipleSelection.length <= 0" disabled>启用</el-button>
	        <el-button type="success" v-else @click="disabedBtn(1, '启用')">启用</el-button>
	        <el-button-group class="btn-other">
	            <el-button v-if="multipleSelection.length <= 0" disabled>
	                <img src="../../../assets/images/export.png" alt="">
	            </el-button>
	            <el-button title="导出" v-else @click="exportExcel">
	                <img src="../../../assets/images/export.png" alt="">
	            </el-button>
	            <el-button title="导入">
                    <el-upload class="upload-demo" :action="$url" :show-file-list="false" multiple style="display: inline-block;">
                        <img src="../../../assets/images/import.png" alt="">
                    </el-upload>
                </el-button>                 
	            <el-button title="打印">
	                <img src="../../../assets/images/print.png" alt="">
	            </el-button>
	            <el-button title="帮助">
	                <img src="../../../assets/images/help.png" alt="">
	            </el-button>
	        </el-button-group>
	    </div>
	</div>
</template>
<script>
export default {
	data() {
		return {
			searchText: '',
			// multipleSelection: [],
			// selectRowId: []
		}
	},
	computed: {
		multipleSelection() {
			return this.$store.state.borrowCategoryStore.multipleSelection;
		},
		selectRowId() {
			return this.$store.state.borrowCategoryStore.selectRowId;
		}
	},
	methods: {
		search() {},
		refresh() {},
		add() {
			this.$util.openLayerIframe({title: '借款类别审批单', width: '800px', height: '500px', url: this.$domain + '/#/basicData/borrowCategory/form'});
		},
		del() {},
		disabedBtn(status, msg) {},
		exportExcel() {},
	}
}
</script>